package cn.pugle.geo;

import ch.hsr.geohash.GeoHash;

/**
 * @author tzp
 * @since 2019/11/29
 */
public class GeoHashTest {
    public static void main(String[] args) {
        GeoHash geoHash1 = GeoHash.withBitPrecision(36.9589519010, 111.9136385018, 5);
        System.out.println(geoHash1);
        System.out.println(geoHash1.toBase32());


        GeoHash geoHash2 = GeoHash.withBitPrecision(37.4870140000, -104.7734010000, 10);
        System.out.println(geoHash2.toBase32());

        GeoHash w = GeoHash.fromGeohashString("9w");
        System.out.println(w);
    }
}
